-
Notifications
You must be signed in to change notification settings - Fork 634
feat: log secGemini response to /tmp/ if timesketch app mode is set to DEBUG #3562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a helpful debugging feature to log SecGemini responses to a file when Timesketch is in DEBUG mode. My review focuses on improving the implementation's adherence to the style guide for import ordering, and more critically, enhancing the security and portability of the file-writing logic. I've suggested using standard library functions for creating temporary files securely to prevent potential vulnerabilities and ensure cross-platform compatibility.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Stream conversation directly into a file to save memory * Ensure all responses are recorded and not just the last for debugging * Store data as json where possible for easier debugging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to fix some minor logic bugs but now it works.
- Streams results now directly into files to save on memory.
- Records all messages during the conversation and not just the final one.
- Stores the messages as jsonl for easier processing.
If Timesketch is set to DEBUG, log the responses of secgemini to a file in
/tmp/. This drastically increases ability to debug and troubleshoot interactions with the LLM backend.